package jdt.gui;

import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;

import jdt.geom.Point;

public class JdtMouseListener implements MouseListener {

	/* --- Data members --- */
	
	/** All the points on the board */
	private TriangulationGui gui;
	
	/**
	 * Construct a listener with the set of all the points which has to be painted
	 * on the board
	 * 
	 * @param allPoints
	 */
	public JdtMouseListener(TriangulationGui gui) {
		this.gui = gui;
	}

	
	public void mouseClicked(MouseEvent e) {
		Point clickPoint = new Point(e.getX(), e.getY());
		gui.addPoint(clickPoint);
		gui.repaint();
	}

	
	public void mousePressed(MouseEvent e) {
		// Nothing here
	}

	
	public void mouseReleased(MouseEvent e) {
		// Nothing here
	}

	
	public void mouseEntered(MouseEvent e) {
		// Nothing here
	}

	
	public void mouseExited(MouseEvent e) {
		// Nothing here
	}

}
